﻿using TestBat.IModels.Domain;

namespace TestBat.Models.Domain
{
    public class TestResults : ITestResults
    {
        public float? PercentageCorrect
        {
            get;
            set;
        }

        public float? PercentageIncorrect
        {
            get
            {
                return (PercentageCorrect.HasValue) ? 100.0f - PercentageCorrect : null;
            }
        }

        public float? Points
        {
            get
            {
                return (PercentageCorrect.HasValue) ? PercentageCorrect / 100.0f * MaximumPoints : null;
            }
        }

        public uint MaximumPoints
        {
            get;
            set;
        }

        public int? Rank
        {
            get;
            set;
        }

        public int NumGradedTests
        {
            get;
            set;
        }

        public int PresentedTasks
        {
            get;
            set;
        }

        public int PerformedTasks
        {
            get;
            set;
        }

        public int NotPerformedTasks
        {
            get;
            set;
        }
    }
}
